#!/bin/bash

#
# Installation of VLC player.
# 
# Target platform: Based on Ubuntu(Ubuntu Kylin/Ubuntu Desktop/Linux Mint/ZorinOS/DeepinOS), include graphical interface, and not applicable to any server version.
# Create date: 2019/06/27
# Create user: SteveJrong
# File version: 1.0.0

# Import some shells.
. common/common.sh

# ######################### start of variables #########################
APP_PACKAGE_KEYWORD_1="vlc"
# ######################### end of variables #########################

# ######################### start of functions #########################
# ######################### end of functions #########################

# ######################### start of install VLC player #########################
echo '------------------------- Starting install VLC player.'

echo '------------------------- Installation status checked.'
fullName=
eval findAppPackageFullNameByKeyword $APP_PACKAGE_KEYWORD_1 $APP_PACKAGE_INSTALLATION_MODE_DPKG_APT fullName

if [[ -n $fullName ]]; then
	echo -e "------------------------- Starting uninstall old app package:" $fullName
	sudo sudo apt-get remove --purge $fullName
else
	outputWarnMsg "App package not installation or query failure!"
fi
echo -e "------------------------- Done.\n"
sleep 5

echo '------------------------- Installing application package.'
sudo sudo apt-get install $APP_PACKAGE_KEYWORD_1
echo -e "------------------------- Done.\n"

outputSuccessMsg "Install VLC player is complete!"
# ######################### end of install VLC player #########################